Greet-by-Name


Exercise 1

Create a function greet(name).
Inside the function, print a greeting message using the name parameter.
Call the function with different argument values (e.g., greet("Alice"), greet("Bob")).

   
console.log("Greet-BY-Name");

function greet(name) {
    return "Hello, " + name + "!";
}
console.log(greet("Shabbir-console"))
document.getElementById("ex1").innerText = greet("Print-Shabbir");